package com.shaozi.nc.mq.substance;

import org.apache.log4j.Logger;
import org.json.JSONObject;

import com.shaozi.data.mq.business.base.SourceTypeConsts.OA.Attendance;
import com.shaozi.data.mq.business.bean.MQExchangeRuleBean;
import com.shaozi.data.mq.business.bean.MQPushItem;
import com.shaozi.data.mq.business.bus.substance.BasePushSubstanceHandler;
import com.shaozi.lib.throwable.SzException;
import com.shaozi.nc.mq.bean.attendance.AttendanceNoticesBean;
import com.shaozi.nc.mq.bean.attendance.CommonBean;


public class AttendancePushSubstance extends BasePushSubstanceHandler {

	private Logger logger = Logger.getLogger(AttendancePushSubstance.class);

	public AttendancePushSubstance() {

	}

	@Override
	protected void onExchangeBiz(MQExchangeRuleBean pushData, MQPushItem pushItem, JSONObject jsonObj) throws SzException {
		switch (pushItem.getSourceType()) {
		case Attendance.Notices:
			exchangeBiz(pushData, jsonObj, AttendanceNoticesBean.class);
			break;
		default:
			exchangeBiz(pushData, jsonObj, CommonBean.class);
			break;
		}
	}

}
